<template>
  <NavBar>{{ item.noticeType == 1 ? '通知详情' : '公告详情' }}</NavBar>
  <div style="padding: 0 45rpx;">
    <div class="top">
      <div class="title">{{ item.noticeTitle }}</div>
      <div class="time">{{ item.createTime }}</div>
    </div>
    <div class="content">
      {{ item.noticeContent }}
    </div>
  </div>
</template>
<script setup>
import { onLoad } from '@dcloudio/uni-app';
import { ref } from 'vue'

const item = ref({})
onLoad((e) => {
  console.log(JSON.parse(e.item));
  item.value = JSON.parse(e.item)
})
</script>
<style lang="less" scoped>
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 30rpx 0;

  .title {
    font-weight: bold;
    font-size: 44rpx;
    width: 350rpx;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--a-one-text-color)
  }

  .time {
    color: var(--a-three-text-color);
    font-size: 26rpx;
  }
}

.content {
  font-size: 28rpx;
  line-height: 50rpx;
  color: var(--a-two-text-color);
}
</style>